import type { VxeGridProps } from '#/adapter/vxe-table'
import { pushRoleTypeOptions, templateStatusOptions } from '#/config/options/system'
import { $t } from '@vben/locales'
// 列表表头
export const columns: VxeGridProps['columns'] = [
    {
        field: 'name',
        title: $t('page.system.children.messageTemplat.children.form.templateName')
    },
    {
        field: 'receiver',
        title: $t('page.system.children.messageTemplat.children.form.pushRole')
    },
    {
        field: 'title',
        title: $t('page.system.children.messageTemplat.children.form.title')
    },
    {
        field: 'content',
        title: $t('page.system.children.messageTemplat.children.form.content')
    },
    {
        field: 'createTime',
        title: $t('page.system.children.messageTemplat.children.form.createTime')
    },
    {
        field: 'status',
        title: $t('page.system.children.messageTemplat.children.form.templateStatus'),
        slots: { default: 'status' }
    },
    // {
    //     field: 'receiverType',
    //     title: $t('page.system.children.messageTemplat.children.form.pushType')
    // },
    {
        field: 'action',
        fixed: 'right',
        slots: { default: 'action' },
        title: $t('common.action'),
        width: 120
    }
]

export const serch = [
    {
        fieldName: 'name',
        label: $t('page.system.children.messageTemplat.children.form.templateName'),
        component: 'Input'
    },
    {
        fieldName: 'status',
        label: $t('page.system.children.messageTemplat.children.form.templateStatus'),
        component: 'Select',
        componentProps: {
            options: templateStatusOptions
        }
    },
    {
        fieldName: 'receiverType',
        label: $t('page.system.children.messageTemplat.children.form.pushRole'),
        component: 'Select',
        componentProps: {
            options: pushRoleTypeOptions
        }
    }
]
